package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"home/api/internal/config"
	"home/homerpc/homerpcclient"
)

type ServiceContext struct {
	Config  config.Config
	HomeRpc homerpcclient.Homerpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:  c,
		HomeRpc: homerpcclient.NewHomerpc(zrpc.MustNewClient(c.HomeRpc)),
	}
}
